/*
 *
 */
package com.hanhai.zrb.api.biz.dao.mybatis;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.hanhai.zrb.api.biz.dao.mybatis.base.BaseMapper;
import com.hanhai.zrb.model.common.SysConfig;

public interface SysConfigDao extends BaseMapper {

	/**
	 * 保存or覆盖
	 */
	@Update("replace into sys_config(syskey,value,memo)values(#{syskey},#{value},#{memo})")
	public void save(SysConfig sysConfig);

	/**
	 * 获取全部
	 */
	@Select("select syskey,value,memo from sys_config")
	public List<SysConfig> getAll();

	/**
	 * 获取
	 */
	@Select("select syskey,value,memo from sys_config where syskey=#{key}")
	public SysConfig getByKey(String key);
}
